jsx3.Class.defineClass(
        "tibco.admin.monitormanage.uicomponents.page.serviceView.tabContent.deployment.Deployment", //the full name of the class to create
        jsx3.lang.Object, //  extends
        [tibco.admin.monitormanage.uicomponents.page.serviceView.ServiceTabInterface], // implements
        function (plugin) {
        	plugin.getServiceIdSubject = "com.tibco.admin.monitormanage.uicomponents.page.serviceView.tabContent.deployment.Deployment.getServiceId";
        
            plugin.instance = null;
            plugin.prototype.serviceId ;

            plugin.getInstance = function(args) {
                if(!this.instance) {
                    this.instance = new tibco.admin.monitormanage.uicomponents.page.serviceView.tabContent.deployment.Deployment();
                }
                return this.instance;
            }

            plugin.prototype.getNamespace = function() {
               return "tibco.admin";
            }
            
            plugin.prototype.getTabText = function() {
				return tibco.admin.Main.getServer().getDynamicProperty("@MM@general@DeploymentDetailsTitle");
            	//return "Deployment Details";
            }
            
            plugin.prototype.updateComponent = function(serviceIdVal) {    
            	var message = { serviceId:serviceIdVal };
                this.serviceId = serviceIdVal;
                tibco.admin.monitormanage.general.PageBusUtils.publish(plugin.getServiceIdSubject, message);

            }

            plugin.prototype.loadComponent = function(parent) {
                var deploymentBlock = tibco.admin.Main.loadUIResource(parent, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/page/serviceView/tabContent/deployment/components/deployment.xml", true);
                
                var interfacesPane = deploymentBlock.getDescendantOfName("leftContentPane");
        		if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.table || !tibco.admin.monitormanage.uicomponents.table.interfaces || !tibco.admin.monitormanage.uicomponents.table.interfaces.Interfaces)
                { tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/table/interfaces/Interfaces.js", this.getNamespace()); }
                var interfacesObj = tibco.admin.Main.loadUIResource(interfacesPane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/table/interfaces/components/interfaces.xml", true);
                interfacesObj.setUpComponent("_MM_svc", false ,this.serviceId);

                var deployedServicePane = deploymentBlock.getDescendantOfName("rightContentPane");
        		if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.table || !tibco.admin.monitormanage.uicomponents.table.deployedService || !tibco.admin.monitormanage.uicomponents.table.deployedService.DeployedService)
                { tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/table/deployedService/DeployedService.js", this.getNamespace()); }
                var deployedServiceObj = tibco.admin.Main.loadUIResource(deployedServicePane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/table/deployedService/components/deployedService.xml", true);
                deployedServiceObj.setUpComponent("_dplydSvc_MM_svc", this.serviceId);
            }

        });